/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * FormPenerimaanPembelian.java
 *
 * Created on May 9, 2011, 11:55:43 PM
 */

package com.kifas.ui.stok;

import com.kifas.model.xml.BarangModel;
import com.kifas.model.xml.GudangModel;
import com.kifas.model.xml.PenerimaanDetailModel;
import com.kifas.model.xml.PenerimaanModel;
import com.kifas.model.xml.PersistStatus;
import com.kifas.model.xml.ReferenceNumberingModel;
import com.kifas.sales.ui.tablemodel.ComboBarangCellEditor;
import com.kifas.service.MasterService;
import com.kifas.service.PenerimaanService;
import com.kifas.ui.master.LookUpGudang;
import java.awt.Component;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.table.AbstractTableModel;
import org.jdesktop.beansbinding.AutoBinding.UpdateStrategy;
import org.jdesktop.beansbinding.BindingGroup;
import org.jdesktop.swingbinding.JComboBoxBinding;
import org.jdesktop.swingbinding.SwingBindings;

/**
 *
 * @author dhamarsu
 */
public class FormPenerimaanLain extends javax.swing.JInternalFrame {
    private GudangModel gudangModel;
    private List<PenerimaanDetailModel> penerimaanDetailModels;
    private PenerimaanModel penerimaanModel;
    private PenerimaanDetailModel penerimaanDetailModel;
    private PenerimaanService penerimaanService = new PenerimaanService();
    private MasterService masterService = new MasterService();
    private List<BarangModel> barangs;
    /** Creates new form FormPenerimaanPembelian */
    public FormPenerimaanLain() {
        initComponents();

        barangs =  masterService.getBarangs();

        tableOrder.setAutoCreateColumnsFromModel(false);
        penerimaanDetailModels = new ArrayList<PenerimaanDetailModel>();
        

        BindingGroup bindingGroup = new BindingGroup();
         JComboBoxBinding barangBinding =
                SwingBindings.createJComboBoxBinding(
                UpdateStrategy.READ,
                barangs,
                cboBarang);

        cboBarang.setRenderer(new DefaultListCellRenderer() {
           @Override
           public Component getListCellRendererComponent(
                   JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
               super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
               if (value instanceof BarangModel) {
                   BarangModel mec = (BarangModel)value;
                   setText(mec.getNamaBarang());
               }
               return this;
           }
        });
        bindingGroup.addBinding(barangBinding);
        bindingGroup.bind();

        tableOrder.setAutoscrolls(true);

        tableOrder.getColumnModel().getColumn(0).setCellEditor(new ComboBarangCellEditor( cboBarang));

        refreshTable();
    }



    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        dtPenerimaan = new com.toedter.calendar.JDateChooser();
        jLabel4 = new javax.swing.JLabel();
        txtNoPenerimaan = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        txtGudang = new javax.swing.JTextField();
        btnGudang = new javax.swing.JButton();
        cboBarang = new javax.swing.JComboBox();
        jToolBar1 = new javax.swing.JToolBar();
        btnAdd = new javax.swing.JButton();
        btnSave = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        btnDo = new javax.swing.JButton();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jScrollPane3 = new javax.swing.JScrollPane();
        tableOrder = new javax.swing.JTable();
        jPanel3 = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        txtKeterangan = new javax.swing.JTextArea();

        setClosable(true);
        setIconifiable(true);
        setTitle("Form Penerimaan Lain-Lain");

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N

        jLabel2.setText("Tanggal");
        jLabel2.setName("jLabel2"); // NOI18N

        dtPenerimaan.setName("dtPenerimaan"); // NOI18N

        jLabel4.setText("No Penerimaan");
        jLabel4.setName("jLabel4"); // NOI18N

        txtNoPenerimaan.setText("AUTO");
        txtNoPenerimaan.setName("txtNoPenerimaan"); // NOI18N

        jLabel6.setText("Gudang");
        jLabel6.setName("jLabel6"); // NOI18N

        txtGudang.setName("txtGudang"); // NOI18N

        btnGudang.setText("...");
        btnGudang.setName("btnGudang"); // NOI18N
        btnGudang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGudangActionPerformed(evt);
            }
        });

        cboBarang.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cboBarang.setName("cboBarang"); // NOI18N
        cboBarang.setPreferredSize(new java.awt.Dimension(0, 0));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(dtPenerimaan, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(txtNoPenerimaan, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel6)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(txtGudang, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnGudang, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(cboBarang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(421, 421, 421))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(txtNoPenerimaan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6)
                    .addComponent(txtGudang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnGudang))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(dtPenerimaan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cboBarang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Master", jPanel1);

        jToolBar1.setRollover(true);
        jToolBar1.setName("jToolBar1"); // NOI18N
        jToolBar1.setPreferredSize(new java.awt.Dimension(100, 30));

        btnAdd.setText("New");
        btnAdd.setFocusable(false);
        btnAdd.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnAdd.setName("btnAdd"); // NOI18N
        btnAdd.setPreferredSize(new java.awt.Dimension(100, 29));
        btnAdd.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAddActionPerformed(evt);
            }
        });
        jToolBar1.add(btnAdd);

        btnSave.setText("Save");
        btnSave.setFocusable(false);
        btnSave.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSave.setName("btnSave"); // NOI18N
        btnSave.setPreferredSize(new java.awt.Dimension(100, 29));
        btnSave.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSaveActionPerformed(evt);
            }
        });
        jToolBar1.add(btnSave);

        jButton1.setText("Cancel");
        jButton1.setFocusable(false);
        jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton1.setName("jButton1"); // NOI18N
        jButton1.setPreferredSize(new java.awt.Dimension(100, 29));
        jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        jToolBar1.add(jButton1);

        btnDo.setText("Print");
        btnDo.setFocusable(false);
        btnDo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnDo.setName("btnDo"); // NOI18N
        btnDo.setPreferredSize(new java.awt.Dimension(100, 29));
        btnDo.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnDo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDoActionPerformed(evt);
            }
        });
        jToolBar1.add(btnDo);

        jTabbedPane2.setTabPlacement(javax.swing.JTabbedPane.BOTTOM);
        jTabbedPane2.setName("jTabbedPane2"); // NOI18N

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        tableOrder.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "Kode BRG", "Nama", "Qty", "Satuan", "Bulan Kadaluarsa"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, true, true, false, true
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tableOrder.setName("tableOrder"); // NOI18N
        tableOrder.setRowHeight(24);
        tableOrder.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                tableOrderKeyPressed(evt);
            }
        });
        jScrollPane3.setViewportView(tableOrder);

        jTabbedPane2.addTab("Daftar Item", jScrollPane3);

        jPanel3.setName("jPanel3"); // NOI18N

        jLabel11.setText("Keterangan");
        jLabel11.setName("jLabel11"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        txtKeterangan.setColumns(20);
        txtKeterangan.setRows(5);
        txtKeterangan.setText("-");
        txtKeterangan.setName("txtKeterangan"); // NOI18N
        jScrollPane2.setViewportView(txtKeterangan);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel11)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(289, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 679, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addGap(12, 12, 12)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 655, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(16, 16, 16)
                .addComponent(jTabbedPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 651, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(16, 16, 16)
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(20, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed
        // TODO add your handling code here:
        List<PenerimaanDetailModel> list = new ArrayList<PenerimaanDetailModel>();

        penerimaanModel = new PenerimaanModel();
        for(PenerimaanDetailModel pdm : penerimaanDetailModels){
            penerimaanDetailModel = new PenerimaanDetailModel();
            penerimaanDetailModel.setBarang(pdm.getBarang());
            penerimaanDetailModel.setGudang(gudangModel);
            penerimaanDetailModel.setKeterangan("");
            penerimaanDetailModel.setQty(pdm.getQty());
            penerimaanDetailModel.setBulanKadaluarsa(pdm.getBulanKadaluarsa());
            list.add(penerimaanDetailModel);
        }

        penerimaanModel.setKeterangan(txtKeterangan.getText());

        ReferenceNumberingModel rf = masterService.getReferenceNumber(1, "RCV/O");
        txtNoPenerimaan.setText(rf.getResult());
        penerimaanModel.setNomorPenerimaan(txtNoPenerimaan.getText());
        penerimaanModel.setTanggal(dtPenerimaan.getDate());

        Set<PenerimaanDetailModel> set = new HashSet(list);
        penerimaanModel.setPenerimaanDetailModels(set);

        try{
            PersistStatus status = penerimaanService.setPenerimaan(penerimaanModel);
            JOptionPane.showMessageDialog(null, status.getStatus());
            if (status.getStatus().equals("success")){
                btnSave.setEnabled(false);
            }
        }catch(Exception ex){
            ex.printStackTrace();
            JOptionPane.showMessageDialog(null, "Penyimpanan gagal.");
        }
}//GEN-LAST:event_btnSaveActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        clearForm();
}//GEN-LAST:event_jButton1ActionPerformed

    private void btnDoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDoActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_btnDoActionPerformed

    private void btnGudangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGudangActionPerformed
        // TODO add your handling code here:
        gudangModel = new LookUpGudang(null, closable).getGudangModel();
        if(gudangModel != null)
            txtGudang.setText(gudangModel.getNamaGudang());
    }//GEN-LAST:event_btnGudangActionPerformed

    private void btnAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddActionPerformed
        // TODO add your handling code here:
        clearForm();
        penerimaanDetailModels.add(new PenerimaanDetailModel());
        refreshTable();
    }//GEN-LAST:event_btnAddActionPerformed

    private void tableOrderKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tableOrderKeyPressed
        // TODO add your handling code here:
        if (tableOrder.getSelectedColumn() == 4 && evt.getKeyCode() == KeyEvent.VK_ENTER){
            if(!tableOrder.getValueAt(tableOrder.getSelectedRow(), 0).equals("")){
                penerimaanDetailModels.add(new PenerimaanDetailModel());
                refreshTable();
            }else{
                JOptionPane.showMessageDialog(null, "Kode Barang untuk baris ini tidak boleh kosong", "Information", JOptionPane.ERROR_MESSAGE);
            }
        }
    }//GEN-LAST:event_tableOrderKeyPressed

    private void clearForm(){
        btnSave.setEnabled(true);
        penerimaanDetailModels = new ArrayList<PenerimaanDetailModel>();

        txtNoPenerimaan.setText("AUTO"); txtGudang.setText("");
        dtPenerimaan.setDate(null);
        refreshTable();
    }

    private class PenerimaanTableModel extends AbstractTableModel{
        private List<PenerimaanDetailModel> penerimaanDetailModels;

        public PenerimaanTableModel(List<PenerimaanDetailModel> penerimaanDetailModels) {
            this.penerimaanDetailModels = penerimaanDetailModels;
        }

        @Override
        public int getRowCount() {
            return penerimaanDetailModels.size();
        }

        @Override
        public Object getValueAt(int rowIndex, int columnIndex) {
            PenerimaanDetailModel s = penerimaanDetailModels.get(rowIndex);
            try{
                if (columnIndex == 0){
                    if (s.getBarang() != null)
                        return s.getBarang().getKdBarang();
                }else if (columnIndex == 1){
                    if (s.getBarang() != null)
                        return s.getBarang().getNamaBarang();
                }else if (columnIndex == 2){
                    if (s.getQty() != null)
                        return s.getQty();
                }else if (columnIndex == 3){
                     if (s.getBarang().getSatuan().getSatuan() != null)
                        return s.getBarang().getSatuan().getSatuan();
                }else if (columnIndex == 4){
                     if (s.getBulanKadaluarsa() != null)
                        return s.getBulanKadaluarsa();
                }
            }catch(Exception e){
                return "";
            }
            return "";
        }

        @Override
        public boolean isCellEditable(int rowIndex, int columnIndex) {
            if(columnIndex == 2 || columnIndex == 4 || columnIndex == 0) {
                return true;
            }
            return false;
        }

        @Override
        public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
            PenerimaanDetailModel s = penerimaanDetailModels.get(rowIndex);
            if (columnIndex == 0){
                s.setBarang((BarangModel) aValue);
            }else if(columnIndex == 2){
                s.setQty(Integer.parseInt(aValue.toString()));
            }else if (columnIndex == 4){
                s.setBulanKadaluarsa((String) aValue);
            }
            refreshTable();
        }

        @Override
        public int getColumnCount() {
            return 5;
        }


    }

    private void refreshTable(){
        tableOrder.setModel(new PenerimaanTableModel(penerimaanDetailModels));
    }



    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAdd;
    private javax.swing.JButton btnDo;
    private javax.swing.JButton btnGudang;
    private javax.swing.JButton btnSave;
    private javax.swing.JComboBox cboBarang;
    private com.toedter.calendar.JDateChooser dtPenerimaan;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JTable tableOrder;
    private javax.swing.JTextField txtGudang;
    private javax.swing.JTextArea txtKeterangan;
    private javax.swing.JTextField txtNoPenerimaan;
    // End of variables declaration//GEN-END:variables

}
